<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>老侯代读</title>
    <meta name="description" content=""/>
    <meta name="keywords" content=""/>
    <link rel="stylesheet" href="/css/style.css">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="/js/jquery.min.js"></script>
    <script src="/js/public.js"></script>
    <script src="/js/postertemp.js"></script>
    <script type="text/javascript">

        wx.config({
            debug: false,
            appId: '{{$wxShare['appId']}}',
            timestamp: '{{$wxShare['timeStamp']}}',
            nonceStr: '{{$wxShare['nonceStr']}}',
            signature: '{{$wxShare['signature']}}',
            jsApiList: [
                // 所有要调用的 API 都要加到这个列表中
                'checkJsApi',
                'onMenuShareTimeline',
                'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
            wx.onMenuShareAppMessage({
                title: '老侯代读', // 分享标题
                desc: '老侯代读', // 分享描述
                link: 'http://wx.laohoulundao.com' + $('#defaulttempimg').attr('src'), // 分享链接
                imgUrl: 'http://wx.laohoulundao.com/images/link.png', // 分享图标
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });
            wx.error(function (res) {
                // config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
                alert("errorMSG:" + res);
            });
        });

    </script>
</head>
<body>

<div class="container">
    <div class="nav user-center-nav tuij-nav">
        <ul class="nav-box clearfix wrap">
            <li class="act"><a href="qrcode.html">我的推广海报 </a></li>
            <li><a href="/partner/bookfriend.html">我推荐的好友</a></li>
        </ul>
    </div>
    <div class="wrap check-poster-box">
        <div class="my-poster">

            <div style="display: none" class="poster-qr-box">
                <img id="qrimg" src="/uploads/qrcode/{{$memberInfo->MemNumber}}.png" alt="">
                <i></i>
            </div>
            {{--<p class="poster-master">我是<a href="">YY</a></p>--}}
            <img style="display: none" id="tempimg" src="images/m-hb.jpg" alt="">
            <img id="defaulttempimg" src="{{$defaultImg}}" alt="">
            <span id="spanimg"></span>
        </div>
        <p class="must-read"><span> [必读]</span>推荐奖励规则</p>
        <p class="poster-btn-box clearfix">
            <a class="mbtn gray-btn more-poster" href="javascript:;">更换海报样式</a>
            <a id="shareFirend" class="mbtn mbtn-sure" >分享好友</a>
        </p>
    </div>
    <div id="mask2" class="mask" class="mask" style="">

        <div class="must-read-box act">
            <h3 class="must-read-title"><a href="/testpay/paymax.html">推荐奖励规则</a></h3>
            <ul class="must-read-items wrap">
                <li>1.用户在老候代读成功分享任意内容一次即可获得1积分。</li>
                <li>2.每天成功分享内容至不同分享通道时，可获得1积分。</li>
                <li>3.每天分享的前三次可获得积分。</li>
            </ul>
            <span class="close">×</span>
            <img class="happy-read" src="images/happy-read.png" alt="">
        </div>
        <div class="mask-mposter-wrap">
            <div class="mposter-list">
                <div class="part-title">
                    <h3><span>请选择海报样式</span></h3>
                </div>
            </div>
            <div class="poster-mask-con wrap">
                <ul class="mposter-items clearfix" id="potemp">
                    @foreach($entPosterTemplate as $data)
                        <li>
                            <img class="poster-style" src="{{$data->FilePath1}}" alt="">
                            <p class="poster-name">{{$data->PosterTitle}}</p>
                        </li>
                    @endforeach
                </ul>
            </div>
            <p><a class="mbtn mbtn-sure sure-poster" id="btnSure" href="javascript:;">确认选择</a></p>

        </div>
        <div class="guide-box">
            <div class="guide">
                请点击右上角<br/>
                将它发给指定的朋友<br/>
                或分享到朋友圈
            </div>
            <a id="iKnow" class="guide-know">我知道了</a>
        </div>
    </div>

</div>
<script src="/js/js.js"></script>
<script>
    $(function(){

        $("#shareFirend").click(function(){
            $(".mask").show().children().removeClass("act").filter(".guide-box").addClass("act");

            $("#iKnow").one("click", function(){
                $(".mask").click();
            })
        })

        $(".must-read").on("click", function(){
            $(".mask").show().children().removeClass("act").filter(".must-read-box").addClass("act");

            $(".close").one("click", function(){
                $(".mask").click();
            })
        });

        $(".mask").on("click", function(){
            $(this).hide(function(){
                //取绑
                $(".mposter-items li").off("click");
            });
        })
        $(".more-poster").on("click", function(){
            $(".mask").show().children().removeClass("act").filter(".mask-mposter-wrap").addClass("act");
            $(".mposter-items li").on("click", function(ev){
                $(this).addClass("act").siblings().removeClass("act");
                stopPro(ev);
            });
        });

        $(".sure-poster").on("click", function(){
            $(".mask").click();
        })

    })
</script>
</body>
</html>